


<div class="layui-form-item">
	<label class="layui-form-label">销售价</label>
	<div class="layui-input-block">
		<input type="text" name="price" id="price" lay-verify="required" autocomplete="off" value="${(goods.price!0)?c}" placeholder="请输入销售价" class="layui-input w300" >
		<#if lvList?exists> 
			<#list lvList as lv> 
				<input type="hidden" class="lvid" value="${lv.lv_id}" name="lvid" /> 
				<input type="hidden" class="lvPrice" lvid="${lv.lv_id}" name="lvPrice" />
			</#list> 
		</#if>
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">成本价</label>
	<div class="layui-input-block">
		<input type="text" name="cost" id="cost"  lay-verify="required" autocomplete="off" value="${(goods.cost!0)?c}" placeholder="请输入成本价" class="layui-input w300" >
	</div>
</div>

<div class="layui-form-item">
	<label class="layui-form-label">重量</label>
	<div class="layui-input-block">
		<input type="text" name="cost" id="cost"  lay-verify="required" autocomplete="off" value="${(goods.cost!0)?c}" placeholder="请输入重量" class="layui-input w300" >
	</div>
	<div class="layui-form-mid layui-word-aux">克(g)</div>
</div>

<#if specList?exists && (specList?size gt 0)>
<div class="layui-form-item advui no-spec-input">
	<label class="layui-form-label">规格</label>
	<div class="layui-input-block">
		<a class="layui-btn layui-btn-normal" id="specOpenBtn" >开启规格</a>
	</div>
</div>
</#if>

<#if goods.goods_id?exists && goods.have_spec?exists> 
<#if goods.have_spec==0>
<script>
	$(function() {
		//初始化商品会员价
		$.ajax({
			url : '${ctx}/shop/admin/member-price/get-lv-price-json.do?ajax=yes',
			data : 'goodsid=${goods.goods_id}',
			dataType : 'json',
			success : function(result) {
				if (result.result == 1) {
					var priceData = result.priceData;
					$.each(priceData, function(i, price) {
						$(
								".member_price_box>input.lvPrice[lvid="
										+ price.lvid + "]").val(price.price);
					});
				} else {
					alert("生成会员价格出错：" + result.message);
				}
			},
			error : function() {
				alert("生成会员价格出错");
			}
		});
		MemberPrice.bindMbPricBtnEvent();
	});
</script>
</#if> 
</#if>
